1. Technical Field
This invention relates to the field of image sensors, more specifically the image sensors which introduce geometric distortions into captured images.
2. Description of the Related Art
Such image sensors have lenses for focusing the captured images of a scene. The presence of these lenses can be a source of distortions in the captured images relative to the scene itself.
Thus a wide-angle lens introduces pincushion distortions as illustrated in FIG. 1, while a lens with a small angle, or zoom lens, introduces barrel distortions as illustrated in FIG. 2.
In FIG. 1, an image 11 corresponds to an image of the scene to be captured and an image 12 corresponds to an image captured from the scene by an image sensor which introduces a pincushion distortion. In an XY image coordinate system, the image 12 has lines which bulge toward the center of the image on the X and Y axes.
No distortion affects the image 11 which corresponds to the image of the original scene, and a distance R separates the optical center 101 or center of the image from a given pixel 102.
However, in the captured image 12 of this scene affected by a distortion, a distance R′, which can vary relative to the distance R as a function of the pixels concerned, separates the center of the image or optical center 103 from a given pixel 104.
Similarly, in FIG. 2, an image 21 corresponds to an image of the scene to be captured and an image 22 corresponds to an image captured from the scene by an image sensor which introduces a barrel distortion. In an XY image coordinate system, the image 22 has lines which bulge toward the outside of the image on the X and Y axes.
No distortion affects the image 21 which corresponds to the image of the original scene. As was described with reference to FIG. 1, a distance R separates the optical center or center of the image from a given pixel in the undistorted image 21.
However, in the captured image 22 of this scene affected by a distortion, a distance R′, which can vary relative to the distance R as a function of the pixels concerned, separates the center of the image or optical center from a given pixel in the captured and therefore distorted image.
In these two types of distortions, note that the distortions introduced into the lines of pixels on the X and Y axes are greater at the edges than at the center of the captured image.
To correct these geometric distortions of the image, a distortion correction algorithm can be implemented in the sensors. Such a correction algorithm is conventionally based on an approximation of the distortion, for a given pixel in the captured image, which can be expressed in the form of the following equation:D=(R−R′)/R=Da*(y2−x2+yoffset)+Db*R4  (1)
where D represents the distortion as a percentage,                R is the distance between the center of the image, or optical center, and the current given pixel in the undistorted image,        R′ is the distance between the center of the image and the current given pixel in the distorted image,        Da and Db are distortion parameters,        x is a coordinate for the horizontal position of the current given pixel and y is a coordinate for the vertical position of the current given pixel, and        R satisfies the following equation:R2=X2+y2         
The distortion thus modeled as a parabola equation has no effect on the image when the distortion parameters Da and Db are zero.
However, when these two distortion parameters both have negative values a barrel distortion affects the captured image, and when these two distortion parameters both have positive values the captured image is affected with a pincushion distortion.
When these two distortion parameters have values with different signs, the distortion profile varies between the two types of distortions.
These two distortion parameters are therefore parameters that characterize the lens used in the image sensor in question.
The distortion affecting the captured image is a geometric aberration which is due to the lenses. It is characterized by a curve in a source plane which increases with the distance from the optical center.
In this context, the correction of the distortion affecting the captured image aims to correct the distortions due to the lens by determining the distance between the center of the image and each pixel in the original undistorted image of the scene, in order to apply it to a distorted captured image. Thus one can reestablish distances between the pixels in the captured image which are substantially equal to the distances between these same pixels in the undistorted image of the scene.
During such a correction of barrel-type geometric distortions, the captured and distorted image is enlarged due to this correction. Certain pixels of this corrected image are then ignored in order to end with a corrected image that is the same size as the initial captured image. The captured image processed in this manner does not undergo a specific enlargement step, as it is the correction itself which results in the enlargement of the captured image.
Conversely, during a correction of pincushion-type geometric distortions, the captured image, corrected using a correction of the same type as described above, is reduced in size relative to the size of the initial captured image. As a result, it is necessary to add a step of enlarging the corrected captured image such that the final image is once again the size of the initially captured image.
FIG. 3 illustrates the application of the above steps to correct an image which has a pincushion distortion.
A captured image 31 has pincushion distortions. To correct these distortions, all pixels of the image are used. A corrected image 33 is thus obtained which is smaller in size than the captured image 31. Next this smaller corrected image 33 is enlarged so that it corresponds to the size of the captured image.
In such a correction, the captured image undergoes two processing steps, one the correction of the pincushion distortion which corresponds to obtaining the corrected captured image 33 from the captured image 31, and an enlargement of the image which corresponds to obtaining the final image 34 in which the distortions have been corrected from the captured corrected image 33, where the image 34 is of the same size as the captured image 31.
These two successive processing steps result in a degradation in the quality of the final image 34 obtained, because such an image 34 undergoes a loss of resolution in each of these two processing steps. The second step, the enlargement step, which is a supplemental step in addition to the correction applied to images which have a barrel-type geometric distortion, results in a loss of image resolution.